<template>
	<view>
		<app-header :fixed="false" :title="headerTitle" />
		<view class="z-banner">
			<image class="img" src="../../static/images/header-bj.png" mode="widthFix" />
			<view class="comm-container courier-warper">
				<template v-if="size == 'large'">
					<Large-item-delivery :type="type"  />
				</template>
				<template v-else>
					<Small-item-delivery :type="type" :region="region" />
				</template>
			</view>
		</view>
	</view>
</template>

<script>
	import AppHeader from "@/subpages/components/header.vue"
	import LargeItemDelivery from "@/subpages/components/LargeItemDelivery.vue"
	import SmallItemDelivery from "@/subpages/components/SmallItemDelivery.vue"
	export default {
		components: {
			AppHeader,
			LargeItemDelivery,
			SmallItemDelivery
		},
		data() {
			return {
				size: 'small',
				type: '1',
				region: 'domestic',
				headerTitle: "寄快递"
			}
		},
		onLoad(options) {
			this.size = options.size;
			this.type = options.type;
			this.region = options.region;
			if(this.region == 'international') {
				this.headerTitle  = "国际快递"
			}else {
				this.headerTitle = this.size == 'small' ? '寄快递' : '寄大件';
			}
		}
	}
</script>

<style scoped lang="scss">
	.z-banner {
		width: 100%;
		position: relative;
		.img {
			position: absolute;
			width: 100%;
			top: 0;
			left: 0;
			z-index: 1;
		}
	}
	.courier-warper {
		position: relative;
		z-index: 88;
		padding-top: 200rpx;
	}
</style>